package com.maxmlr.music.user.service.transfer;

import com.maxmlr.music.common.util.DateUtil;
import com.maxmlr.music.song.entity.Song;
import com.maxmlr.music.system.entity.Files;
import com.maxmlr.music.user.entity.UserInfo;
import com.maxmlr.music.user.entity.UserSongEstimate;
import com.maxmlr.music.user.param.UserInfoParam;
import com.maxmlr.music.user.param.UserSongEstimateInParam;
import com.maxmlr.music.user.param.UserSongEstimateOutParam;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.Map;
import java.util.Objects;

/**
 * @ClassName SongEstimateTransfer
 * @Description TODO
 * @Author maxiao
 * @Date 2020/6/8 下午4:44
 * @Version V1.0
 */
@Component
public class UserInfoTransfer {

    public UserInfoParam po2UserInfoParam(UserInfo userInfo, String url) {
        UserInfoParam userInfoParam = new UserInfoParam();
        userInfoParam.setId(userInfo.getId());
        userInfoParam.setUserName(userInfo.getUserName());
        userInfoParam.setPhone(userInfo.getPhone());
        userInfoParam.setEmail(userInfo.getEmail());
        userInfoParam.setStatus(userInfo.getStatus());
        userInfoParam.setRegisterSource(userInfo.getRegisterSource());
        userInfoParam.setHeadImgId(userInfo.getHeadImgId());
        userInfoParam.setHeadImgUrl(url);
        userInfoParam.setCreateTime(userInfo.getCreateTime());
        userInfoParam.setUpdateTime(userInfo.getUpdateTime());
        return userInfoParam;
    }
}
